﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace WinAutomator.Library
{
    public class WAProccessInfo
    {
        IProcess _process;
        
        public WAProccessInfo(IProcess process)
        {
            _process = process;
        }

        public List<Type> getIn()
        {
            List<Type> ret = new List<Type>();

            Type t = _process.GetType();
            PropertyInfo[] pi = t.GetProperties(BindingFlags.Instance | BindingFlags.NonPublic |
            BindingFlags.Public);

            //foreach (PropertyInfo p in pi)
            //    if (p.PropertyType.Name == typeof(WinAutomator.Library.InOut.WAIn<>).Name)
            //        ret.Add(p.PropertyType);

            return ret;
        }

        public List<Type> getOut()
        {
            List<Type> ret = new List<Type>();

            Type t = _process.GetType();
            PropertyInfo[] pi = t.GetProperties(BindingFlags.Instance | BindingFlags.NonPublic |
            BindingFlags.Public);

            //foreach (PropertyInfo p in pi)
            //    if (p.PropertyType.Name == typeof(WinAutomator.Library.InOut.WAOut<>).Name)
            //        ret.Add(p.PropertyType);

            return ret;
        }

    }
}
